JavaScript: Novice to Ninja by Darren Jones
Author: Darren Jones , Date: August 16, 2017
, Views: 207
The window.screen object contains information about the screen that the browser is displayed on. You can find out the height and width of the screen in pixels using the height and width properties respectively:
window.screen.height; << 1024 window.screen.width; << 1280
The availHeight and availWidth can be used to find the height and width of the screen, excluding any operating system menus:
window.screen.availWidth; << 1280 window.screen.availHeight; << 995
The colorDepth property can be used to find the color bit depth of the user’s monitor, although there are few use cases for doing this other than collecting user statistics:
window.screen.colorDepth; << 24
Copyright Disclaimer:
This site does not store any files on its server. We only index and link
to content provided by other sites. Please contact the content providers
to delete copyright contents if any and email us, we'll remove relevant
links or contents immediately.